import Home from '../pages/home.vue';
import Login from '../pages/Login'
import StuInfo from '../pages/infoManage/StuInfo'
import TeInfo from '../pages/infoManage/TeInfo'
import BookConsul from '../pages/BookConsul'
import PublicAnnoun from '../pages/PublicAnnoun'
import Exam from '../pages/Exam'
import Knowledge from '../pages/Knowledge'
import Message from '../pages/Message'
import PersonalCenter from '../pages/PersonalCenter'
const routes = [{
        path: '/login',
        component: Login,
        name: '登录',
        isHidden: true,
    },
    // ...formattedRoutes
    {
        path: '/home',
        component: Home,
        name: '首页',
    },
    {
        path: '/infoManage',
        name: '信息管理',
        role: 'admin',
        children: [{
            path: 'stuInfo',
            component: StuInfo,
            name: '学生信息',
        }, {
            path: 'teInfo',
            component: TeInfo,
            name: '教师信息',
        }]
    },
    {
        path: '/bookConsul',
        component: BookConsul,
        name: '预约咨询管理',
    },
    {
        path: '/publicAnnoun',
        component: PublicAnnoun,
        name: '公告管理',
    },
    {
        path: '/knowledge',
        component: Knowledge,
        name: '知识管理',
    },
    {
        path: '/exam',
        component: Exam,
        name: '测试管理',
    },
    {
        path: '/message',
        component: Message,
        name: '留言管理',
    },
    {
        path: '/personalCenter',
        component: PersonalCenter,
        name: '个人中心',
    },

]
// console.log(routes);
// localStorage.removeItem('dynamicRoutes')
localStorage.setItem('menuInfo', JSON.stringify(routes))

export default routes